package com.itheima.demo02;

import java.util.HashMap;

public class HashMapDemo01 {

    public static void main(String[] args) {

        Student s1 = new Student("qw",213);
        Student s2 = new Student("er",24);
        Student s3 = new Student("girl",23);

        HashMap<String,Student> hashMap = new HashMap<>();

        hashMap.put("laji",s1);
        hashMap.put("caiji",s2);
        hashMap.put("lese",s3);

        hashMap.forEach((s, student) -> System.out.println(s+"- - - - -"+student.getName()+"-----"+student.getAge()));
    }
}
